package chapter_2.demo_4;

import java.util.concurrent.Callable;

/**
 * @author: hero生仔
 */
public class Main {
    public static void main(String[] args) throws Exception {
        process(() -> System.out.println("你好"));
        Callable<String> fetch = fetch("你好");
        System.out.println(fetch.call());
    }
    public static void process(Runnable r) {
        r.run();
    }

    public static Callable<String> fetch(String str) {
        return () -> str;
    }
}
